package com.ustudy.entity.sns;

import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.ustudy.core.dao.support.entity.LongIdEntity;

import com.ustudy.entity.iden.RegUser;

/**
 * 留言评论
 * @author caizh
 *
 */
@SuppressWarnings("serial")
@Entity(name="LeaveMessageComment")
@Table(name="SNS_LEAVE_MESSAGE")
public class LeaveMessageComment extends LongIdEntity {
	
	@Column
	@Lob
	@Basic(fetch=FetchType.LAZY)
	private String body;
	
	@ManyToOne(cascade={CascadeType.REFRESH},fetch=FetchType.LAZY)
	@JoinColumn(name="USER_ID")
	private RegUser regUser;
	
	private Long replyTime=System.currentTimeMillis();
	
	private Boolean display=true;

	@ManyToOne(cascade={CascadeType.REFRESH},fetch=FetchType.LAZY)
	@JoinColumn(name="LM_ID")
	private LeaveMessage leaveMessage;
	
	public String getBody() {
		return body;
	}

	public void setBody(String body) {
		this.body = body;
	}

	public RegUser getRegUser() {
		return regUser;
	}

	public void setRegUser(RegUser regUser) {
		this.regUser = regUser;
	}

	public Long getReplyTime() {
		return replyTime;
	}

	public void setReplyTime(Long replyTime) {
		this.replyTime = replyTime;
	}

	public Boolean getDisplay() {
		return display;
	}

	public void setDisplay(Boolean display) {
		this.display = display;
	}

	public LeaveMessage getLeaveMessage() {
		return leaveMessage;
	}

	public void setLeaveMessage(LeaveMessage leaveMessage) {
		this.leaveMessage = leaveMessage;
	}
	
	
}
